<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="commn/base.css" />
		<link rel="stylesheet" type="text/css" href="css/weui.min.css" />
		<link rel="stylesheet" type="text/css" href="css/jquery-weui.min.css" />
		<link rel="stylesheet" type="text/css" href="Hui-iconfont/1.0.8/iconfont.css" />
		<style type="text/css">
			body {
				display: -webkit-box;
				-webkit-box-orient: vertical;
				width: 100%;
			}
			
			.index {
				min-width: 240px;
			}
			
			.top {
				position: fixed;
				display: -webkit-box;
				width: 100%;
				height: 40px;
				background-color: #0F88EB;
			}
			
			.top>span {
				line-height: 40px;
				text-indent: 1em;
				color: white;
				display: -webkit-box;
				font-size: 18px;
				font-weight: bold;
				-webkit-box-flex: 1;
			}
			
			.back {
				color: white;
				font-size: 18px;
				margin-left: 15px;
				line-height: 40px;
			}
			
			.content {
				margin:3px;
				height: 300px;
				/*border-bottom: 1px solid #EEEEEE;*/
				margin: 40px 10px 50px 10px;
				
			}

			.content_title {
				height: 30px;
				/*border: 1px solid;*/
				font-size: 16px;
				font-weight: bold;
				color: black;
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
			}
			
			.content_text {
				font-size: 14px;
				height: 65px;
				color: black;
				display: -webkit-box;
				word-break: break-word;
				overflow: hidden;
				-webkit-line-clamp: 3;
				-webkit-box-orient: vertical;
			}
			.content_item {
				height: 30px;
				line-height: 30px;
				font-size: 12px;
				color: #C4C4C4;
				border-bottom: 1px solid #EEEEEE;
			}
			.mei{
				height: 100px;
				font-size: 16px;
				font-weight: bold;
				color: #999999;
				line-height: 100px;
				text-align: center;
			}
		</style>
	</head>

	<body>
		<div class="index"> 
			<div class="top"> 
				<a href="home.html" class="back Hui-iconfont Hui-iconfont-slider-left"></a>
				<span>已为您找到如下内容</span>
			</div>
			<div class="content">
				<span v-for="lee in message" @click="link(lee.id)" v-if="message.length>0">
						<div class="content_title" v-html="lee.title"></div>
						<div class="content_text" v-html="lee.context"></div>
						<div class="content_item">
							<span v-html="lee.n_zan"></span>赞同 <span v-html="lee.n_ping"></span>评论<span style="margin-left: 20px;" v-html="lee.time"></span>
						</div>
				</span>
				<div class="mei" v-if="message.length==0">
					暂无相关内容...
				</div>	
			</div>
		</div>
		<script src="js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var newVue = new Vue({
				el: "body",
				data: {
					message:[]
				},
				methods:{
					link:function(e){
						location.href="detail.html?id="+e;
					}
				}
				
			})
			var ss;
			var dd;
			$.ajax({
				type: 'get',
				//async:false,
				url: "http://v2.mashupcloud.cn/developer/auth.do",
				data: {
					appkey: 'FvWrIYOQoTUYVbscUNQoQAVqsLnZqKEN',
					appsecret: 'ugCfcSmyLkcbCGfIuFOPEgTgPQPbyJSE'

				},
				success: function(json) {
					//		            console.log(json);
					ss = JSON.parse(json)[1];
					dd = JSON.parse(json)[2];
					console.log('获得token成功');
					$.ajax({
						type: 'get',
						url: "http://v2.mashupcloud.cn/SQL/sele_tie_mohu/",
						data: {
							appid: dd,
							token: ss,
							name: 'sele_tie_mohu',
							_v1:sessionStorage.getItem("gjc"),
							_v2:sessionStorage.getItem("gjc")
						},
						success: function(json) {
							console.log(JSON.parse(json));
							newVue.message= JSON.parse(json)[2]
						},
						error: function(json) {
							console.log("err:" + json);
						}
					});
				},
				error: function(json) {
					console.log("err:" + json);
				}
			});
		</script>
	</body>

</html>